<script setup>
  import { useRouter } from 'vue-router';
  import { ref } from 'vue';

  let myPath = ref('')
  const router = useRouter();

  function fun() {
    // router.push(myPath.value)
    router.push({path: myPath.value})
  }

</script>

<template>
  <div>
    
    请输入路径：<input v-bind:type="'text'" v-model="myPath"/>
    <input v-bind:type="'button'" v-bind:value="'跳转'" v-on:click="fun()"/>
    <hr/>
    <router-view></router-view>
    <router-view name="masterBedroom"></router-view>
  </div>
</template>

<style scoped>

</style>
